 <template>
  <el-table 
    ref="singleTable" 
    :data="reset" 
    style="width: 100%" 
    border
    @selection-change="handleSelectionChange"
    :header-cell-style="{background:'#f4f4f4'}">
    <el-table-column fixed type="selection" align="center" width="55"></el-table-column>
    <!-- <el-table-column prop="WorkShopID" label="ID" width="50"></el-table-column> -->
    <el-table-column 
    type="index"
    label="序号"
    align="center"
    width="55">
    </el-table-column>
    <el-table-column prop="WorkShopName" label="车间名称" align="center"></el-table-column>
    <el-table-column prop="IsEnableFormat" label="状态" align="center"></el-table-column>
    <el-table-column prop="LinkMan" label="车间联系人" align="center"></el-table-column>
    <el-table-column prop="LinkPhone" label="联系电话" align="center"></el-table-column>
    <el-table-column prop="CreateByFormat" label="创建人" align="center"></el-table-column>
    <el-table-column 
      prop="CreateTime" 
      :show-overflow-tooltip="true"
      align="center"
      label="创建时间">
    </el-table-column>
    <el-table-column prop="LastModifyByFormat" label="修改人" align="center"></el-table-column>
    <el-table-column 
      prop="LastModifyTime" 
      align="center"
      :show-overflow-tooltip="true"
      label="修改时间">
    </el-table-column>
  </el-table>
</template>

  <script>
export default {
  props:{
    reset:{
      type:Array
    }
  },
  data() {
    return {
      
    };
    
  },
  methods:{
    handleSelectionChange(val){
          this.$emit('changeData',val)
          let listId=[]
          val.forEach(el => {
              listId.push(el.WorkShopID)
          });
          this.$emit('getId',listId)
    },
  }
};
</script>